<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="referrer" content="no-referrer">
    <title>Document</title>
    <script src="./lib/dist/include-openlayers-local.js"></script>
  </head>
  <body>
    <div id="map"></div>
    <script>
      const tianDiTu_vec = new ol.layer.Tile({
        title: '天地图矢量图层',
        source: new ol.source.XYZ({
          url: 'http://t0.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=' + '27179df627e03e8300f1d4beb0fd40f0',
          wrapX: false
        })
      })
      const tianDiTu_cva = new ol.layer.Tile({
        title: '天地图矢量标记图层',
        source: new ol.source.XYZ({
          url: 'http://t0.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=' + '27179df627e03e8300f1d4beb0fd40f0',
          wrapX: false
        })
      })
      const map = new ol.Map({
        target: 'map',
        layers: [tianDiTu_vec, tianDiTu_cva],
        view: new ol.View({
          projection: 'EPSG:4326',
          center: [104.549690, 30.392090],
          zoom: 14
        })
      })
    </script>
  </body>
</html>
